package com.shanxia.codec.enums;

import java.util.Objects;

public enum WipeOrderEnum {

    WIPE(0xAA55, "擦除"),
    QUERY(0x0000,  "查询"),
    UNKNOWN(99, "未知");


    public static WipeOrderEnum getByPos(int code) {
        for (WipeOrderEnum enums : WipeOrderEnum.values()) {
            if (Objects.equals(enums.code, code)) {
                return enums;
            }
        }
        return WipeOrderEnum.UNKNOWN;
    }


    WipeOrderEnum(int code, String descr) {
        this.code = code;
        this.descr = descr;
    }

    public int code;
    public String descr;
}
